"""
LEGB
"""


def foo():
    x = 100

    def bar():
        nonlocal x
        x = 200
        print(x)

    print(x)
    bar()
    print(x)


def main():
    foo()


if __name__ == '__main__':
    main()
